<?
/**
 * Result collector. 
 * Some modified POJO class to save info about each Result for different actions from spotlight.xml configuration file.
 *  
 * @package SpotLight.core.configurator.collector
 * @version since begin
 * @author asmhack
 * @license GPL
 * @copyright Serhiy Zaporozhets'
 */
class ResultColl {
   
   /**
    * not required parametr
    *
    * @var string
    */
   private $name;
   
   /**
    * Type of result:
    * 				redirect||ajax <-(default)
    *
    * @var string
    */
   private $type;
   
   private $action = null;
   
   public function __construct($name = '', $type = '') {
      $this->name = $name;
      $this->type = $type;
   }
   
   public function setName($name) {
      $this->name = $name;
   }
   
   public function getName() {
      return $this->name;
   }
   
   public function setAction($action) {
      $this->action = $action;
   }
   
   public function getAction() {
      return $this->action;
   }
   
   public function setType($type) {
      $this->type = $type;
   }
   
   public function getType() {
      return $this->type;
   }
   
   public function hasAction() {
      return $this->action != null;
   }
   
   public function __toString() {
      $txt = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Result <b style="color:blue">' . $this->name . '</b> of <b style="color:red">' . $this->type . '</b> ';
      $txt .= 'to <b style="color:green">' . $this->action . '</b>;</br>';
      return $txt;
   }

}
?>